//
//  FRHttpRequest.h
//  FastRunning
//
//  Created by HUA on 2018/4/12.
//  Copyright © 2018年 HUA. All rights reserved.
//

#import <Foundation/Foundation.h>

typedef NS_ENUM(NSInteger, FRHttpRequestType) {
    FRHttpRequestTypeGET,
    FRHttpRequestTypePOST,
};

@interface FRHttpRequest : NSObject
//单例
+ (instancetype) shareHttpRequest;

//post方法 && get方法
- (void)requestWithRequestType:(FRHttpRequestType)requestType URLString:(NSString *)URLString parameters:(id)parameters progress:(void (^)(NSProgress *))progress success:(void (^)(NSURLSessionDataTask *, id))success failure:(void (^)(NSURLSessionDataTask *, NSError *))failure;

//取消所有请求
- (void)cancelAllOperations;


@end
